home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / TO_POWER.HDR < prev    next >
Text File  |  1994-04-25  |  925b  |  37 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _To_Power( nNum1, nNum2 ) --> nInteger
  8.  
  9. PARAMETERS:
  10.  
  11. nNum1 : Base Number
  12. nNum2 : Exponent (power)
  13.  
  14. SHORT:
  15.  
  16. Exponent function (Don't get too excited!).
  17.  
  18. DESCRIPTION:
  19.  
  20. _To_Power() will raise nNum1 to the nNum2 power.  It will also handle
  21. negative powers.
  22.  
  23. NOTE:
  24.  
  25. I wrote this function a LONG time ago BEFORE I remembered that there was a
  26. standard operator for doing it.  Oh well...
  27.  
  28. EXAMPLE:
  29.  
  30. number = _To_Power(3,0)  // number = 1
  31. number = _To_Power(3,1)  // number = 3
  32. number = _To_Power(3,2)  // number = 9
  33. number = _To_Power(3,4)  // number = 27
  34. number = _To_Power(3,-1) // number = 0.33
  35.  
  36. ******************************************************************************/
  37.